package com.zm.daimai.damaiother.web;

import com.zm.daimai.damaiother.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@RestController
public class OtherDo {
    @RequestMapping("other")
    String index(HttpServletRequest request){
        return "other:" + request.getServerPort();
    }

    @Autowired
    ProductMapper productMapper;
    @RequestMapping("hot")
    List<Map<String,Object>> hot(){
        return productMapper.selectHots();
    }
}
